﻿<KCtl:BasePhoneApplicationPage 
    xmlns:KCtl="clr-namespace:Kiva7.Controls"
    x:Class="Kiva7.Pages.FirstStartPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Settings="clr-namespace:Kiva7.Settings"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <KCtl:BasePhoneApplicationPage.Resources>
        <Settings:AppSettings x:Key="appSettings"></Settings:AppSettings>
    </KCtl:BasePhoneApplicationPage.Resources>

    <KCtl:OrientedPivot x:Name="Pivot" Title="Kiva7" IsTabStop="False">
        <!--Pivot item one-->
        <controls:PivotItem Header="{Binding Path=L.Start, Source={StaticResource L}}">
            <StackPanel>
                <TextBlock Text="{Binding Path=L.SetupHeader, Source={StaticResource L}}" 
                            TextWrapping="Wrap"
                           Style="{StaticResource KivaTextNormalStyle}"
                           Margin="12,0,0,12"/>

                <TextBlock Text="{Binding Path=L.SetupStep1, Source={StaticResource L}}" 
                            TextWrapping="Wrap"
                           Style="{StaticResource KivaTextNormalStyle}"/>
                <Button Content="{Binding Path=L.CreateAccount, Source={StaticResource L}}" 
                        Style="{StaticResource KivaButtonStyle}"
                        Click="RegisterClick" Margin="0,12,0,12"/>

                <Button Content="{Binding Path=L.Next, Source={StaticResource L}}" 
                        Style="{StaticResource KivaButtonStyle}"
                        Click="NextClick"  Margin="0,12,0,12" HorizontalAlignment="Right"/>

                <KCtl:YouTubeImageControl YouTubeId="1yP9SPN8lJw"
                                      Text="{Binding Path=L.Kiva7OverviewVideo, Source={StaticResource L}}" />

            </StackPanel>
        </controls:PivotItem>

        <controls:PivotItem Header="KIVA">
            <StackPanel>
                <TextBlock Text="{Binding Path=L.SetupStep2, Source={StaticResource L}}" 
                            TextWrapping="Wrap"
                           Style="{StaticResource KivaTextNormalStyle}"/>
                <TextBlock Text="{Binding Path=L.SetupStep3, Source={StaticResource L}}" 
                        TextWrapping="Wrap"
                       Style="{StaticResource KivaTextNormalStyle}"/>
                <Button Content="{Binding Path=L.SetupGetLenderId, Source={StaticResource L}}" 
                        Style="{StaticResource KivaButtonStyle}"
                        Click="GetLenderIdClick" Margin="0,12,0,12"/>

                <Button Content="{Binding Path=L.Next, Source={StaticResource L}}" 
                        Style="{StaticResource KivaButtonStyle}"
                        Click="NextClick"  Margin="0,12,0,12" HorizontalAlignment="Right"/>
            </StackPanel>
        </controls:PivotItem>

        <controls:PivotItem Header="{Binding Path=L.Done, Source={StaticResource L}}">
            <StackPanel>
                <TextBlock Text="{Binding Path=L.SetupStep4, Source={StaticResource L}}" 
                        TextWrapping="Wrap"
                       Style="{StaticResource KivaTextNormalStyle}"/>
                <TextBox x:Name="tbxLenderId" Text="{Binding Source={StaticResource appSettings}, Path=LenderIdSetting, Mode=TwoWay}"  
                      Margin="0,0,0,0" >
                    <TextBox.InputScope>
                        <InputScope>
                            <InputScopeName NameValue="Text"/>
                        </InputScope>
                    </TextBox.InputScope>
                </TextBox>

                <Button Content="{Binding Path=L.Done, Source={StaticResource L}}" 
                        Style="{StaticResource KivaButtonStyle}"
                        Click="DoneClick"  Margin="0,0,0,12" HorizontalAlignment="Right"/>

            </StackPanel>
        </controls:PivotItem>

    </KCtl:OrientedPivot>

</KCtl:BasePhoneApplicationPage>
